package org.jeecg.module.flow.meter.tcpserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @Author scott
 * @since 2018-12-20
 */
@Data
@TableName("ft_meter_valve_log")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MeterValve implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 水表编号
     */
    private String meterNumber;

    /**
     * 操作类型 关阀0 开阀1 清空-1 写表底数2 设置3 充值4
     */
    private Integer actValue;

    /**
     * 阀门状态
     */
    private Integer valveStatus;

    private String commandId; //指令id

    private String msg; //指令消息

    private Integer status; //指令发送状态 0发送成功 -1发送失败 1执行成功

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date receiveTime;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 操作人
     */
    private String createBy;


    /**指令内容*/
    private String commandContent;


    /**指令源码*/
    private String cmd;

    @TableField(exist = false)
    private Integer optType;

    //写表底数的值
    @TableField(exist = false)
    private String value;

    //设备指令id
    private String deviceCommandId;
}
